package Thread;

public class Thread03 implements Runnable{
    public void run(){
        for (int i=0;i<100;i++){
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        Thread03 t1=new Thread03();
        Thread th1=new Thread(t1);
        th1.start();

        for (int i=0;i<10;i++){
            System.out.println(Thread.currentThread().getName());
            if(i==6){
                try {
                    th1.join();
                }catch (InterruptedException e){
                    e.printStackTrace();
                }
            }
        }
    }
}
